home *** CD-ROM | disk | FTP | other *** search
- 5 dimf$(144)
- 100 :
- 110 print" in alaphabetical order."
- 120 print" print on s[146]creen or p[146]rinter?"
- 130 getod$:ifod$="p"orod$<>""then150
- 140 goto130
- 150 print" ** reading the directory **"
- 160 b=6:c=2:q$=chr$(34):r$="":sp$=" "
- 170 open1,8,0,"$":get#1,a$,b$
- 180 get#1,a$,b$:rem link
- 190 get#1,a$,b$:nb=asc(a$+chr$(0))+256*asc(b$+chr$(0)):rem # of blocks
- 200 get#1,b$:ifst<>0then290
- 210 ifb$<>chr$(34)then200
- 220 get#1,b$:ifb$<>chr$(34)thens$=s$+b$:goto220
- 230 get#1,b$:ifb$=chr$(32)then230
- 240 c$="":ifa=0thenc$=" "
- 250 c$=c$+b$:get#1,b$:ifb$<>""then250
- 260 f$(a)=left$(r$+q$+s$+q$+sp$,19)+left$(c$,b)+"[146]"+mid$(str$(nb)+sp$,2,c)
- 270 s$="":r$="":a=a+1:b=3:c=5
- 280 ifst=0then180
- 290 close1:n=a-1:bf$=mid$(str$(nb)+" blocks free, "+str$(n)+" files.",2)
- 300 print" ** sorting directory **"
- 310 m=n
- 320 m=int(m/2)
- 330 ifm=0then470
- 340 j=1:k=n-m
- 350 i=j
- 360 l=i+m
- 370 cm=cm+1
- 380 iff$(i)<f$(l)then440
- 390 t$=f$(i):f$(i)=f$(l):f$(l)=t$
- 400 sw=sw+1
- 410 i=i-m
- 420 ifi<1then440
- 430 goto360
- 440 j=j+1
- 450 ifj>kthen320
- 460 goto350
- 470 ifod$="p"thenopen4,4:print" ** printing directory **":cmd4
- 480 ifod$<>"p"thenprint"[147]"
- 490 c=2:fori=0ton:printright$(f$(i),c)left$(f$(i),len(f$(i))-c):c=5:
- 500 next:printbf$
- 510 ifod$="p"thenprint:print:print:print#4:close4:goto61000
- 60000 rem see listing again
- 60010 print"do you want to see the listing again?"
- 60020 poke198,0:wait198,1:getk$:ifk$<>"y"andk$<>"n"then60020
- 60030 ifk$="y"then480
- 60040 :
- 61000 print"[147]do you want to do another disk?"
- 61020 poke198,0:wait198,1:getk$:ifk$<>"y"andk$<>"n"then60020
- 61030 ifk$="y"thena=0:goto100
- 61040 :
- 63000 rem connect back to l.s.
- 63002 print"[147]load"chr$(34)"c.payload"chr$(34)",8":print"run"
- 63004 poke198,0:poke631,13:poke632,13:poke198,2:end
-